<script>
import BaseChart from './BaseChart.vue';
import 'echarts-liquidfill'
/*
* https://github.com/ecomfe/echarts-liquidfill
* 水波图不支持dataset
* */
export default {
  extends: BaseChart,
  name: 'CcLiquidChart',
  props: {
    data: {
      type: Array(),
      default() {
        return [0.1]
      }
    }
  },
  data() {
    return {
      series: [{
        type: 'liquidFill',
        radius: '90%',
        animationDuration: 1000,
        outline: {
          show: true,
          borderDistance: 0,
          itemStyle: {
            borderWidth: 1,
            shadowBlur: 20,
          }
        },
        label: {
          show: true,
          color: '#294D99',
          insideColor: '#fff',
          fontSize: 16,
          fontWeight: 'bold',
          align: 'center',
          baseline: 'middle',
          position: 'inside',
        },
      }],
    }
  },
  created() {
    this.series[0]['data'] = this.data;
    this.setOption("series", this.series);
  }
}
</script>
